

class FreeBean {
  FreeBean({
      this.date, 
      this.updateTime, 
      this.month, 
      this.city, 
      this.cityid, 
      this.day, 
      this.nums,});

  FreeBean.fromJson(dynamic json) {
    date = json['date'];
    updateTime = json['update_time'];
    if (json['month'] != null) {
      month = [];
      json['month'].forEach((v) {
        month?.add(Month.fromJson(v));
      });
    }
    city = json['city'];
    cityid = json['cityid'];
    day = json['day'] != null ? Day.fromJson(json['day']) : null;
    nums = json['nums'];
  }
  String? date;
  String? updateTime;
  List<Month>? month;
  String? city;
  String? cityid;
  Day? day;
  num? nums;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['date'] = date;
    map['update_time'] = updateTime;
    if (month != null) {
      map['month'] = month?.map((v) => v.toJson()).toList();
    }
    map['city'] = city;
    map['cityid'] = cityid;
    if (day != null) {
      map['day'] = day?.toJson();
    }
    map['nums'] = nums;
    return map;
  }

}

class Day {
  Day({
      this.winMeter, 
      this.airLevel, 
      this.sunrise, 
      this.air, 
      this.wea, 
      this.weaDay, 
      this.weaNight, 
      this.alarm, 
      this.winSpeed, 
      this.humidity, 
      this.tem, 
      this.win, 
      this.tem2, 
      this.rainPcpn, 
      this.hours, 
      this.tem1, 
      this.weaNightImg, 
      this.visibility, 
      this.weaDayImg, 
      this.pressure, 
      this.airPm25, 
      this.airTips, 
      this.weaImg, 
      this.sunset, 
      this.uvDescription, 
      this.aqi, 
      this.uvIndex,});

  Day.fromJson(dynamic json) {
    winMeter = json['win_meter'];
    airLevel = json['air_level'];
    sunrise = json['sunrise'];
    air = json['air'];
    wea = json['wea'];
    weaDay = json['wea_day'];
    weaNight = json['wea_night'];
    // if (json['alarm'] != null) {
    //   alarm = [];
    //   json['alarm'].forEach((v) {
    //     alarm?.add(Dynamic.fromJson(v));
    //   });
    // }
    winSpeed = json['win_speed'];
    humidity = json['humidity'];
    tem = json['tem'];
    win = json['win'];
    tem2 = json['tem2'];
    rainPcpn = json['rain_pcpn'];
    if (json['hours'] != null) {
      hours = [];
      json['hours'].forEach((v) {
        hours?.add(Hours.fromJson(v));
      });
    }
    tem1 = json['tem1'];
    weaNightImg = json['wea_night_img'];
    visibility = json['visibility'];
    weaDayImg = json['wea_day_img'];
    pressure = json['pressure'];
    airPm25 = json['air_pm25'];
    airTips = json['air_tips'];
    weaImg = json['wea_img'];
    sunset = json['sunset'];
    uvDescription = json['uvDescription'];
    aqi = json['aqi'] != null ? Aqi.fromJson(json['aqi']) : null;
    uvIndex = json['uvIndex'];
  }
  String? winMeter;
  String? airLevel;
  String? sunrise;
  String? air;
  String? wea;
  String? weaDay;
  String? weaNight;
  List<dynamic>? alarm;
  String? winSpeed;
  String? humidity;
  String? tem;
  String? win;
  String? tem2;
  String? rainPcpn;
  List<Hours>? hours;
  String? tem1;
  String? weaNightImg;
  String? visibility;
  String? weaDayImg;
  String? pressure;
  String? airPm25;
  String? airTips;
  String? weaImg;
  String? sunset;
  String? uvDescription;
  Aqi? aqi;
  String? uvIndex;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['win_meter'] = winMeter;
    map['air_level'] = airLevel;
    map['sunrise'] = sunrise;
    map['air'] = air;
    map['wea'] = wea;
    map['wea_day'] = weaDay;
    map['wea_night'] = weaNight;
    if (alarm != null) {
      map['alarm'] = alarm?.map((v) => v.toJson()).toList();
    }
    map['win_speed'] = winSpeed;
    map['humidity'] = humidity;
    map['tem'] = tem;
    map['win'] = win;
    map['tem2'] = tem2;
    map['rain_pcpn'] = rainPcpn;
    if (hours != null) {
      map['hours'] = hours?.map((v) => v.toJson()).toList();
    }
    map['tem1'] = tem1;
    map['wea_night_img'] = weaNightImg;
    map['visibility'] = visibility;
    map['wea_day_img'] = weaDayImg;
    map['pressure'] = pressure;
    map['air_pm25'] = airPm25;
    map['air_tips'] = airTips;
    map['wea_img'] = weaImg;
    map['sunset'] = sunset;
    map['uvDescription'] = uvDescription;
    if (aqi != null) {
      map['aqi'] = aqi?.toJson();
    }
    map['uvIndex'] = uvIndex;
    return map;
  }

}

class Aqi {
  Aqi({
      this.countryEn, 
      this.country, 
      this.airLevel, 
      this.city, 
      this.jinghuaqi, 
      this.kaichuang, 
      this.o3Desc, 
      this.air, 
      this.no2, 
      this.updateTime, 
      this.pm25Desc, 
      this.so2, 
      this.coDesc, 
      this.cityEn, 
      this.pm10Desc, 
      this.yundong, 
      this.kouzhao, 
      this.o3, 
      this.pm10, 
      this.waichu, 
      this.cityid, 
      this.so2Desc, 
      this.co, 
      this.no2Desc, 
      this.airTips, 
      this.pm25,});

  Aqi.fromJson(dynamic json) {
    countryEn = json['countryEn'];
    country = json['country'];
    airLevel = json['air_level'];
    city = json['city'];
    jinghuaqi = json['jinghuaqi'];
    kaichuang = json['kaichuang'];
    o3Desc = json['o3_desc'];
    air = json['air'];
    no2 = json['no2'];
    updateTime = json['update_time'];
    pm25Desc = json['pm25_desc'];
    so2 = json['so2'];
    coDesc = json['co_desc'];
    cityEn = json['cityEn'];
    pm10Desc = json['pm10_desc'];
    yundong = json['yundong'];
    kouzhao = json['kouzhao'];
    o3 = json['o3'];
    pm10 = json['pm10'];
    waichu = json['waichu'];
    cityid = json['cityid'];
    so2Desc = json['so2_desc'];
    co = json['co'];
    no2Desc = json['no2_desc'];
    airTips = json['air_tips'];
    pm25 = json['pm25'];
  }
  String? countryEn;
  String? country;
  String? airLevel;
  String? city;
  String? jinghuaqi;
  String? kaichuang;
  String? o3Desc;
  String? air;
  String? no2;
  String? updateTime;
  String? pm25Desc;
  String? so2;
  String? coDesc;
  String? cityEn;
  String? pm10Desc;
  String? yundong;
  String? kouzhao;
  String? o3;
  String? pm10;
  String? waichu;
  String? cityid;
  String? so2Desc;
  String? co;
  String? no2Desc;
  String? airTips;
  String? pm25;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['countryEn'] = countryEn;
    map['country'] = country;
    map['air_level'] = airLevel;
    map['city'] = city;
    map['jinghuaqi'] = jinghuaqi;
    map['kaichuang'] = kaichuang;
    map['o3_desc'] = o3Desc;
    map['air'] = air;
    map['no2'] = no2;
    map['update_time'] = updateTime;
    map['pm25_desc'] = pm25Desc;
    map['so2'] = so2;
    map['co_desc'] = coDesc;
    map['cityEn'] = cityEn;
    map['pm10_desc'] = pm10Desc;
    map['yundong'] = yundong;
    map['kouzhao'] = kouzhao;
    map['o3'] = o3;
    map['pm10'] = pm10;
    map['waichu'] = waichu;
    map['cityid'] = cityid;
    map['so2_desc'] = so2Desc;
    map['co'] = co;
    map['no2_desc'] = no2Desc;
    map['air_tips'] = airTips;
    map['pm25'] = pm25;
    return map;
  }

}

class Hours {
  Hours({
      this.vis, 
      this.rainPcpn, 
      this.hours, 
      this.wea, 
      this.aqinum, 
      this.weaImg, 
      this.aqi, 
      this.winSpeed, 
      this.tem, 
      this.win,});

  Hours.fromJson(dynamic json) {
    vis = json['vis'];
    rainPcpn = json['rain_pcpn'];
    hours = json['hours'];
    wea = json['wea'];
    aqinum = json['aqinum'];
    weaImg = json['wea_img'];
    aqi = json['aqi'];
    winSpeed = json['win_speed'];
    tem = json['tem'];
    win = json['win'];
  }
  String? vis;
  String? rainPcpn;
  String? hours;
  String? wea;
  String? aqinum;
  String? weaImg;
  String? aqi;
  String? winSpeed;
  String? tem;
  String? win;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['vis'] = vis;
    map['rain_pcpn'] = rainPcpn;
    map['hours'] = hours;
    map['wea'] = wea;
    map['aqinum'] = aqinum;
    map['wea_img'] = weaImg;
    map['aqi'] = aqi;
    map['win_speed'] = winSpeed;
    map['tem'] = tem;
    map['win'] = win;
    return map;
  }

}

class Month {
  Month({
      this.date, 
      this.moonset, 
      this.winNight, 
      this.sunrise, 
      this.airLevel, 
      this.week, 
      this.narrativeNight, 
      this.weaC, 
      this.air, 
      this.wea, 
      this.weaDay, 
      this.weaNight, 
      this.winDay, 
      this.humidity, 
      this.rainDay, 
      this.win, 
      this.tem2, 
      this.rainPcpn, 
      this.weaNightImg, 
      this.tem1, 
      this.weaDayImg, 
      this.dateNl, 
      this.rainNight, 
      this.moonrise, 
      this.narrativeDay, 
      this.weaImg, 
      this.sunset, 
      this.uvDescription, 
      this.uvIndex,});

  Month.fromJson(dynamic json) {
    date = json['date'];
    moonset = json['moonset'];
    winNight = json['win_night'];
    sunrise = json['sunrise'];
    airLevel = json['air_level'];
    week = json['week'];
    narrativeNight = json['narrative_night'];
    weaC = json['wea_c'];
    air = json['air'];
    wea = json['wea'];
    weaDay = json['wea_day'];
    weaNight = json['wea_night'];
    winDay = json['win_day'];
    humidity = json['humidity'];
    rainDay = json['rain_day'];
    win = json['win'];
    tem2 = json['tem2'];
    rainPcpn = json['rain_pcpn'];
    weaNightImg = json['wea_night_img'];
    tem1 = json['tem1'];
    weaDayImg = json['wea_day_img'];
    dateNl = json['date_nl'];
    rainNight = json['rain_night'];
    moonrise = json['moonrise'];
    narrativeDay = json['narrative_day'];
    weaImg = json['wea_img'];
    sunset = json['sunset'];
    uvDescription = json['uvDescription'];
    uvIndex = json['uvIndex'];
  }
  String? date;
  String? moonset;
  String? winNight;
  String? sunrise;
  String? airLevel;
  String? week;
  String? narrativeNight;
  String? weaC;
  String? air;
  String? wea;
  String? weaDay;
  String? weaNight;
  String? winDay;
  String? humidity;
  String? rainDay;
  String? win;
  String? tem2;
  String? rainPcpn;
  String? weaNightImg;
  String? tem1;
  String? weaDayImg;
  String? dateNl;
  String? rainNight;
  String? moonrise;
  String? narrativeDay;
  String? weaImg;
  String? sunset;
  String? uvDescription;
  String? uvIndex;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['date'] = date;
    map['moonset'] = moonset;
    map['win_night'] = winNight;
    map['sunrise'] = sunrise;
    map['air_level'] = airLevel;
    map['week'] = week;
    map['narrative_night'] = narrativeNight;
    map['wea_c'] = weaC;
    map['air'] = air;
    map['wea'] = wea;
    map['wea_day'] = weaDay;
    map['wea_night'] = weaNight;
    map['win_day'] = winDay;
    map['humidity'] = humidity;
    map['rain_day'] = rainDay;
    map['win'] = win;
    map['tem2'] = tem2;
    map['rain_pcpn'] = rainPcpn;
    map['wea_night_img'] = weaNightImg;
    map['tem1'] = tem1;
    map['wea_day_img'] = weaDayImg;
    map['date_nl'] = dateNl;
    map['rain_night'] = rainNight;
    map['moonrise'] = moonrise;
    map['narrative_day'] = narrativeDay;
    map['wea_img'] = weaImg;
    map['sunset'] = sunset;
    map['uvDescription'] = uvDescription;
    map['uvIndex'] = uvIndex;
    return map;
  }

}